package org.platform.controller.diagnose;

import com.mc.mic.core.bo.CmdBO;
import com.mc.mic.core.bus.provider.BaseServiceRegister;
import org.platform.mo.csmo.cmd41005.QueryDiagnoseRecordRequestParam;
import org.platform.mo.csmo.cmd41005.QueryDiagnoseRecordResponseParam;
import org.platform.mo.csmo.cmd41006.QueryDiagnoseStepRequestParam;
import org.platform.mo.csmo.cmd41006.QueryDiagnoseStepResponseParam;
import org.platform.mo.csmo.cmd41007.QueryTestDiagnoseResultRequestParam;
import org.platform.mo.csmo.cmd41007.QueryTestDiagnoseResultResponseParam;
import org.platform.mo.csmo.cmd41008.QueryTreeDiagnoseDetailRequestParam;
import org.platform.mo.csmo.cmd41008.QueryTreeDiagnoseDetailResponseParam;
import org.platform.mo.csmo.cmd41009.QueryLinkTestResultRequestParam;
import org.platform.mo.csmo.cmd41009.QueryLinkTestResultResponseParam;
import org.platform.mo.csmo.cmd41010.QueryBerTestResultRequestParam;
import org.platform.mo.csmo.cmd41010.QueryBerTestResultResponseParam;
import org.platform.mo.csmo.cmd41011.QueryGtTestResultRequestParam;
import org.platform.mo.csmo.cmd41011.QueryGtTestResultResponseParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 诊断记录(日志)接口
 *
 * @author FengJie
 * @date 2018/7/19
 */
@RestController
public class DiagnoseRecordRegister extends BaseServiceRegister {
    /**
     * 查询诊断记录（41005）
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "41005")
    public CmdBO queryDiagnoseRecord(@RequestBody CmdBO<QueryDiagnoseRecordRequestParam, QueryDiagnoseRecordResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }


    /**
     * 查询诊断测试步骤(41006)
     */
    @PostMapping(value = "41006")
    public CmdBO queryDiagnoseStep(@RequestBody CmdBO<QueryDiagnoseStepRequestParam, QueryDiagnoseStepResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }


    /**
     * 测试结果查询(41007)
     */
    @PostMapping(value = "41007")
    public CmdBO queryTestDiagnoseResult(@RequestBody CmdBO<QueryTestDiagnoseResultRequestParam, QueryTestDiagnoseResultResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 查询故障树诊断详情(41008)
     *
     * @param cmdBO
     * @return
     */
    @PostMapping(value = "41008")
    public CmdBO queryTreeDiagnoseDetail(@RequestBody CmdBO<QueryTreeDiagnoseDetailRequestParam, QueryTreeDiagnoseDetailResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 查询链路测试结果(41009)
     *
     * @return 最近50条信号强度集合
     */
    @PostMapping(value = "41009")
    public CmdBO queryLinkTestResult(@RequestBody CmdBO<QueryLinkTestResultRequestParam, QueryLinkTestResultResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 查询误码率测试结果(41010)
     *
     * @return 返回最近50条 测量EBN0 集合
     */
    @PostMapping(value = "41010")
    public CmdBO queryBerTestResult(@RequestBody CmdBO<QueryBerTestResultRequestParam, QueryBerTestResultResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }

    /**
     * 查询gt测试结果(41011)
     *
     * @return 返回最近50条 频率集合
     */
    @PostMapping(value = "41011")
    public CmdBO queryGtTestResult(@RequestBody CmdBO<QueryGtTestResultRequestParam, QueryGtTestResultResponseParam> cmdBO) {
        return super.serviceExecutor(cmdBO);
    }


}
